package com.org.mapi.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * @author xxy
 * @date 2022/1/4 15:45
 */
@Configuration
@EnableSwagger2
public class MagicApiConfig {
//    @Bean
//    public Docket createDocket(){
//        return new Docket(DocumentationType.SWAGGER_2)
//                .apiInfo(getApiInfo())
//                .select()
//                .apis(RequestHandlerSelectors.basePackage("org.com.controller"))
//                .paths(PathSelectors.any())
//                .build();
//    }
//
//    private ApiInfo getApiInfo() {
//        return new ApiInfoBuilder()
//                .title("Swagger2测试口文档")
//                .description("Swagger2测试接口文档")
//                .contact(new Contact("Swagger2","https://www.baidu.com","850383874@qq.com"))
//                .version("1.0").build();
//    }
}
